// 动火作业
import request from "@/utils/request.js";


//查询
export function listSpecialWork (params){
  return request({
    url: `/system/operation/tabu`,
    method: 'get',
    params
  })
}
//修改
export function editSpecialWork (id){
  return request({
    url: `/system/assignment/apply/${id}`,
    method: 'get',
    
  })
}
//下一步
export function nextSpecialWork (currentPage){
  return request({
    url: `/system/assignment/apply/next/?currentPage=${currentPage}`,
    method: 'get',
    
  })
}
//动火作业-措施确认
export function confirmSpecialWork (data){
  return request({
    url: `/system/assignment/confirm`,
    method: 'post',
    data
  })
}
//动火作业-现场确认
export function siteConfirmSpecialWork (data){
  return request({
    url: `/system/assignment/scene`,
    method: 'post',
    data
  })
}
//动火作业-审核确认
export function examineSpecialWork (data){
  return request({
    url: `/system/assignment/examine`,
    method: 'post',
    data
  })
}
//上一步详情
export function backSpecialWork (data){
  return request({
    url: `/system/assignment/apply/backNext`,
    method: 'post',
    data
  })
}
//动火作业-作业分析确认
export function analysisSpecialWork (data){
  return request({
    url: `/system/assignment/analysis`,
    method: 'post',
    data
  })
}
//动火作业-结束作业
export function finishSpecialWork (data){
  return request({
    url: `/system/assignment/analysis/stop`,
    method: 'post',
    data
  })
}
//新增
export function addSpecialWork (data){
  return request({
    url: `/system/assignment/apply`,
    method: 'post',
    data
  })
}
//删除
export function deleteSpecialWork (ids){
  return request({
    url: `/system/operation/${ids}`,
    method: 'delete',
  })
}
//详情
export function detailSpecialWork (id){
  return request({
    url: `/assignment/apply/${id}`,
    method: 'get'
  })
}



/***
 * 
 * 凯源（新）
 * 
 */

//新增
export function addFireWork (data){
  return request({
    url: `/system/master`,
    method: 'post',
    data
  })
}

//修改
export function editFireWork (data){
  return request({
    url: `/system/master`,
    method: 'put',
    data
  })
}

//查询
export function searchFireWork (query){
  return request({
    url: `/system/master/list`,
    method: 'get',
    params: query
  })
}

//删除
export function deleteFireWork (ids){
  return request({
    url: `/system/master/${ids}`,
    method: 'delete',
  })
}

//详情
export function detailFireWork (id){
  return request({
    url: `/system/master/${id}`,
    method: 'get'
  })
}


//流程操作按钮
export function operateFireWork (data){
  return request({
    url: `/system/master/approval`,
    method: 'put',
    data
  })
}


//获取作业票号
export function getJobNumber (){
  return request({
    url: `/system/master/getAutoFlowCode`,
    method: 'get',
  })
}



//获取关联数据
export function getConnect (query){
  return request({
    url: `/system/master/relevance/list`,
    method: 'get',
    params: query
  })
}

//关联数据
export function relevanceConnect (data){
  return request({
    url: `/system/master/relevance`,
    method: 'post',
    data
  })
}

//取消关联数据
export function disConnect (data){
  return request({
    url: `/system/master/disassociate`,
    method: 'post',
    data
  })
}